package AbstractTransactions

import (
	"Salary/Model"
	"fmt"
	"log"
)


type ChangeAffiliationTransaction struct{
	ChangeEmployeeTransaction
	ChangeAffiliationTransactions
}

type ChangeAffiliationTransactions interface{
	RecordMembership(e Model.Employee)
	GetAffiliation() Model.Affiliation
}

func (cha *ChangeAffiliationTransaction)Changes(e Model.Employee){
	cha.RecordMembership(e)
	af := cha.GetAffiliation()
	e.SetAffiliation(af)
}

func (cha *ChangeAffiliationTransaction)CalculateDeductions (pc Model.Paycheck) {
	err := fmt.Errorf("The method or operation is not implemented.")
	log.Println(err.Error())
}

